/**
 * 
 */
package org.cuatrovientos.searchmap;
import java.util.Random;

/**
 * This program is a map that show one "X" in a random position.
 * @author carlos_ruiz
 *
 */
public class SearchMap {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String [][] map = new String [10][10];
		Random random = new Random();
		int x = 0;
		int y = 0;
		
		System.out.println();
		
		for (int i=0; i<map.length; i++){
			for(int j=0; j<map[i].length;j++){
				map[i][j] = " ";
			} 
		}
		
		//Get random coordinates
		x = random.nextInt(10);
		y = random.nextInt(10);
		//Put X there...
		map[x][y] = "X";
		System.out.println(" ");
		for (int i = 0; i < 10; i++){
			System.out.print(i+" ");
			
		System.out.println();
			
		for (int i=0; i<map.length; i++){
			System.out.print(i);
			for(int j=0; j<map[i].length;j++){
				System.out.print("["+map[i][j]+"]");
				
			}
			
		}	
		
		
		
		
		/*
		System.out.println("  0 1 2 3 4 5 6 7 8 9");
		System.out.println("0 [][][][][][][][][][]");
		System.out.println("1 [][][][][][][][][][]");
		System.out.println("2 [][][][][][][][][][]");
		System.out.println("3 [][][][][][][][][][]");
		System.out.println("4 [][][][][][][][][][]");
		System.out.println("5 [][][][][][][][][][]");
		System.out.println("6 [][][][][][][][][][]");
		System.out.println("7 [][][][][][][][][][]");
		System.out.println("8 [][][][][][][][][][]");
		System.out.println("9 [][][][][][][][][][]");*/
	
		
		
	}

}}
